<?
date_default_timezone_set('Asia/Kuala_Lumpur');
$db = mysql_connect("localhost", DB_USERNAME, DB_PASSWORD) or die('I cannot connect to the database because: ' . mysql_error());
mysql_select_db(DB_NAME);

if (SANDBOX_MODE==0) {
    
    if(empty($no_fb_validate)){
    $facebook = new Facebook(array(
                'appId' => FACEBOOK_APP_ID,
                'secret' => FACEBOOK_APP_SECRET_KEY,
                'cookie' => true
            ));


    //===== use session ======
    //$session = $facebook->getSession();
    $session = $facebook->getUser();
    
    //echo ".".$session;
    }
} 
?>